package com.wjjun.customview.views.dropdownmenu;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

/**
 * adapter
 * Created by 67535 on 2018/5/21.
 */
public abstract class MenuAdapter extends BaseAdapter {


    public MenuAdapter() {
    }

    protected OnFilterDoneListener listener;

    protected void bindListener(OnFilterDoneListener listener) {
        this.listener = listener;
    }

    protected float getItemWeight(int position){
        return 1;
    }

    /**
     * 设置标题, 如果不需要额外设置,则返回false
     */
    public abstract View getMenuItemView(int index, ViewGroup parentContainer);

    public abstract void notifyItemChange(View view, int index, boolean isCheck, boolean isClose);
}
